<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>:: JSP 프로젝트 v1 ::</title>
<link href="css/normalize" rel="stylesheet">
<!-- 공통부분 css파일 따로 생성 후 적용 -->
<link href="css/jech913.css" rel="stylesheet">
<style type="text/css">
/*회원가입 폼 정렬*/
#loginfrm {
	border: 1px solid red; 
	width: 365px;
	/* padding-top:120px; */
}
#loginfrm label{
	width: 120px;
	text-align:right;
	font-weight:bold;
	display:inline-block;
	padding:0 10px 0 0;
}
#loginfrm div{
	margin:10px 10px;
}
</style>
</head>

<body>
	<!-- 구역 구분-->
	<header>
		<!-- 제목, 메뉴 -->
		<!-- 제목 -->
		<h2>JSP 프로젝트 v1</h2>
		<ul id="nav">
			<li><a href="indexT.html">Home</a></li>
			<li><a href="joinT.html">회원가입</a></li>
			<li><a href="loginT.html">로그인</a></li>
			<li><a href="listT.html">게시판</a></li>
			<li><a href="myinfoT.html">회원정보</a></li>
		</ul>
		<!-- 구분선 -->
		<div class="hr"></div>
	</header>

	<div id="contents">
		<h2>:: 로그인 ::</h2>
		<form name="loginfrm" id="loginfrm" class="centerme">
			<div>
				<label for="userid">아이디</label><input type="text" name="userid"
					id="userid" />
			</div>
			<div>
				<label for="passwd">비밀번호</label><input type="password" name="passwd"
					id="passwd" />
			</div>
			
			<div>
				<label></label>
				<button type="button" id="loginokbtn">로그인</button>
			</div>
		</form>
	</div>


	<footer>
		<div class="hr"></div>
		<p class="copy">Copyrights(c)2014.jech913.All rights Reserved.</p>
	</footer>

	<script type="js/jquery-1.11.1.min.js"></script>
	<script type="js/jech913.js"></script>
	<script type="text/javascript">
		var loginfrm = document.getElementById("loginfrm");
		loginokbtn.onclick = function(){loginme();};
	</script>
	<script type="text/javascript">
		function loginme(){
			var loginfrm = document.getElementById("loginfrm");
			if(loginfrm.userid.value==""&& loginfrm.passwd.value=""){
				alert('아이디,비밀번호를 입력하세요!');
			}else if(loginfrm.userid.value=""){
				alert('아이디를 입력하세요!');
			}else if(loginfrm.passwd.value=""){
				alert('비밀번호를 입력하세요!');
			}else{
				loginfrm.method="post";
				loginfrm.action="login.jsp";
				loginfrm.submit();
			}
		}
	</script>
</body>
</html>